home *** CD-ROM | disk | FTP | other *** search
/ Amiga Developer CD v2.1 / Amiga Developer CD v2.1.iso / NDK / NDK_1.3 / Read-Me1.3 / Autodocs1.3 / diskfont.doc < prev    next >
Text File  |  1988-07-26  |  4KB  |  147 lines

  1.  
  2.  
  3. TABLE OF CONTENTS
  4.  
  5. diskfont.library/AvailFonts
  6. diskfont.library/DisposeFontContents
  7. diskfont.library/NewFontContents
  8. diskfont.library/OpenDiskFont
  9.  
  10.  
  11. diskfont.library/AvailFonts                     diskfont.library/AvailFonts
  12.  
  13.   NAME
  14.     AvailFonts - build an array of all fonts in memory / on disk
  15.  
  16.   SYNOPSIS
  17.     error = AvailFonts(buffer, bufBytes, types);
  18.                A0       D0         D1
  19.  
  20.   FUNCTION
  21.     AvailFonts fills a user supplied buffer with the structure,
  22.     described below, that contains information about all the
  23.     fonts available in memory and/or on disk.  Those fonts
  24.     available on disk need to be loaded into memory and opened
  25.     via OpenDiskFont, those already in memory are accessed via
  26.     OpenFont.  The TextAttr structure required by the open calls
  27.     is part of the information AvailFonts supplies.
  28.  
  29.   INPUTS
  30.     buffer - memory to be filled with struct AvailFontsHeader
  31.         followed by an array of AvailFonts elements, which
  32.         contains entries for the available fonts and their
  33.         names.
  34.     
  35.     bufBytes - the number of bytes in the buffer
  36.     types - AFF_MEMORY is set to search memory for fonts to fill
  37.         the structure, AFF_DISK is set to search the disk for
  38.         fonts to fill the structure.  Both can be specified.
  39.  
  40.   RESULTS
  41.     buffer - filled with struct AvailFontsHeader followed by the
  42.         AvailFonts elements, There will be duplicate entries
  43.         for fonts found both in memory and on disk, differing
  44.         only by type.  The existance of a disk font in the
  45.         buffer indicates that it exists as an entry in a font
  46.         contents file -- the underlying font file has not been
  47.         checked for validity, thus an OpenDiskFont of it may
  48.         fail.
  49.     error - if non-zero, this indicates the number of bytes needed
  50.         for AvailFonts in addition to those supplied.  Thus
  51.         structure elements were not returned because of
  52.         insufficient bufBytes.
  53.  
  54.  
  55. diskfont.library/DisposeFontContents
  56.  
  57.    NAME
  58.     DisposeFontContents - free the result from NewFontContents
  59.  
  60.    SYNOPSIS
  61.     DisposeFontContents(fontContentsHeader)
  62.                 A1
  63.  
  64.    FUNCTION
  65.     This function frees the array of FontContents entries
  66.     returned by NewFontContents.
  67.  
  68.    INPUTS
  69.     fontContentsHeader - a struct FontContentsHeader pointer
  70.         returned by NewFontContents.
  71.  
  72.    EXCEPTIONS
  73.     a fontContentsHeader other than one acquired by a call
  74.     NewFontContents will crash.
  75.  
  76.    SEE ALSO
  77.     NewFontContents to get structure freed here.
  78.  
  79.  
  80. diskfont.library/NewFontContents           diskfont.library/NewFontContents
  81.  
  82.    NAME
  83.        NewFontContents - create a FontContents structs for a font
  84.  
  85.    SYNOPSIS
  86.     fontContentsHeader = NewFontContents(fontsLock,fontName)
  87.        D0                                   A0        A1
  88.  
  89.    FUNCTION
  90.     This function creates a new array of FontContents entries
  91.     that describe all the fonts associated with the fontName,
  92.     specifically, all those in the font directory whose name
  93.     is that of the font sans the ".font" suffix.
  94.  
  95.    INPUTS
  96.     fontsLock - a DOS lock on the FONTS: directory (or other
  97.         directory where the font contents file and associated
  98.         font directory resides).
  99.     fontName - the font name, with the ".font" suffix, which
  100.         is also the name of the font contents file.  
  101.  
  102.    RESULT
  103.     fontContentsHeader - a struct FontContentsHeader pointer.
  104.  
  105.    EXCEPTIONS
  106.     D0 is zero if the fontName is does not have a ".font" suffix,
  107.     or a DOS error occurred, or memory could not be allocated for
  108.     the fontContentsHeader.
  109.  
  110.    SEE ALSO
  111.     DisposeFontContents to free the structure acquired here.
  112.  
  113.  
  114. diskfont.library/OpenDiskFont                 diskfont.library/OpenDiskFont
  115.  
  116.    NAME
  117.        OpenDiskFont - load and get a pointer to a disk font.
  118.  
  119.    SYNOPSIS
  120.        font = OpenDiskFont(textAttr)
  121.        D0                  A0
  122.  
  123.    FUNCTION
  124.        This function finds the font with the specified textAttr on
  125.        disk, loads it into memory, and returns a pointer to the font
  126.        that can be used in subsequent SetFont and CloseFont calls.
  127.        It is important to match this call with a corresponding
  128.        CloseFont call for effective management of font memory.
  129.  
  130.        If the font is already in memory, the copy in memory is used.
  131.        The disk copy is not reloaded.
  132.  
  133.    INPUTS
  134.        textAttr - a TextAttr structure that describes the text font
  135.                attributes desired.
  136.  
  137.    RESULTS
  138.        D0 is zero if the desired font cannot be found.
  139.  
  140.    BUGS
  141.        This routine will not work well with font names whose file
  142.     name components are longer than the maximum allowed
  143.     (30 characters).
  144.  
  145.  
  146.  
  147.